<%@ page import="projetoclinica.Paciente" %>



<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'nome', 'error')} required">
	<label for="nome">
		<g:message code="paciente.nome.label" default="Nome" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="nome" required="" value="${pacienteInstance?.nome}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'sexo', 'error')} ">
	<label for="sexo">
		<g:message code="paciente.sexo.label" default="Sexo" />
		
	</label>
	<g:select name="sexo" from="${pacienteInstance.constraints.sexo.inList}" value="${pacienteInstance?.sexo}" valueMessagePrefix="paciente.sexo" noSelection="['': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'cpf', 'error')} required">
	<label for="cpf">
		<g:message code="paciente.cpf.label" default="Cpf" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="cpf" required="" value="${pacienteInstance?.cpf}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'email', 'error')} ">
	<label for="email">
		<g:message code="paciente.email.label" default="Email" />
		
	</label>
	<g:field type="email" name="email" value="${pacienteInstance?.email}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'telefone', 'error')} ">
	<label for="telefone">
		<g:message code="paciente.telefone.label" default="Telefone" />
		
	</label>
	<g:textField name="telefone" value="${pacienteInstance?.telefone}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'dataNascimento', 'error')} required">
	<label for="dataNascimento">
		<g:message code="paciente.dataNascimento.label" default="Data Nascimento" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="dataNascimento" precision="day"  value="${pacienteInstance?.dataNascimento}"  />
</div>





<fieldset class="embedded"><legend><g:message code="paciente.endereco.label" default="Endereco" /></legend>

<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'endereco.logradouro', 'error')} required">
	<label for="endereco.logradouro">
		<g:message code="paciente.endereco.logradouro.label" default="Logradouro" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="endereco.logradouro" required="" value="${pacienteInstance?.endereco?.logradouro}"/>
</div>


<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'endereco.bairro', 'error')} required">
	<label for="endereco.bairro">
		<g:message code="paciente.endereco.bairro.label" default="Bairro" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="endereco.bairro" required="" value="${pacienteInstance?.endereco?.bairro}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'endereco.cep', 'error')} required">
	<label for="endereco.cep">
		<g:message code="paciente.endereco.cep.label" default="Cep" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="endereco.cep" required="" value="${pacienteInstance?.endereco?.cep}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'endereco.cidade', 'error')} required">
	<label for="endereco.cidade">
		<g:message code="paciente.endereco.cidade.label" default="Cidade" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="endereco.cidade" required="" value="${pacienteInstance?.endereco?.cidade}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'endereco.estado', 'error')} required">
	<label for="endereco.estado">
		<g:message code="paciente.endereco.estado.label" default="Estado" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="endereco.estado"  value="${pacienteInstance?.endereco?.estado}" />
</div>


<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'endereco.numero', 'error')} required">
	<label for="endereco.numero">
		<g:message code="paciente.endereco.numero.label" default="Numero" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="endereco.numero" required="" value="${fieldValue(bean: enderecoInstance, field: 'numero')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: pacienteInstance, field: 'endereco.pais', 'error')} required">
	<label for="endereco.pais">
		<g:message code="paciente.endereco.pais.label" default="Pais" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="endereco.pais" required="" value="${pacienteInstance?.endereco?.pais}"/>
</div>

</fieldset>
